package com.contractpage.ec.service.impl;


import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.contractpage.common.persistence.Page;
import com.contractpage.ec.dao.PrinterDepartmentDao;
import com.contractpage.ec.service.PrinterDepartmentService;
import com.contractpage.ec.entity.PrinterDepartment;



/**
 * 
 * PrinterDepartmentServiceImpl数据库操作接口类
 * 
 **/

@Service
public class PrinterDepartmentServiceImpl implements PrinterDepartmentService{
	@Autowired
	private PrinterDepartmentDao printerDepartmentDao;
	@Override
	public Page<PrinterDepartment> findList(Page<PrinterDepartment> page,PrinterDepartment entity){
		entity.setPage(page);
		page.setList(printerDepartmentDao.findList(entity));
		return page;
	}
	@Override
	public int insert(PrinterDepartment entity){
		entity.preInsert("");
		return printerDepartmentDao.insert(entity);
	}
	@Override
	public int update(PrinterDepartment entity){
		entity.preUpdate();
		return printerDepartmentDao.update(entity);
	}
	@Override
	public int delete(PrinterDepartment entity){
		 return printerDepartmentDao.delete(entity);
	}
	@Override
	public List<PrinterDepartment> findAllList(PrinterDepartment entity) {
		return printerDepartmentDao.findAllList(entity);
	}
}